#include <iostream>
using namespace std;

class func
{
public:
	func(){}
	~func(){}
public:
	int x;
};

class func1 : public virtual func
{
public:
	func1(){}
	~func1(){}
public:
	void func()
	{
		cout<<"func() in func1" <<x<<endl;
	}
};

class func2 : public virtual func
{
public:
	func2(){}
	~func2(){}
public:
	void func()
	{
		cout<<"func() in func2" <<x <<endl;
	}
};

class test : public func1, public func2
{
public:
	test(){}
	~test(){}
public:
	void func()
	{
		cout<<"func() in test"<< x<<endl;
	}
};

int main()
{
	test a;
	a.func1::func();
	a.func2::func();
	return 0;
}